#import "~/graphql_shared/fragments/user.fragment.graphql"

query approvalRules($projectPath: ID!, $iid: String!) {
  project(fullPath: $projectPath) {
    id
    mergeRequest(iid: $iid) {
      id
      approvalState {
        invalidApproversRules {
          id
        }
        rules {
          id
          type
          approved
          approvalsRequired
          invalid
          allowMergeWhenInvalid
          name
          section
          approvedBy {
            nodes {
              ...User
            }
          }
          commentedBy {
            nodes {
              ...User
            }
          }
          eligibleApprovers {
            ...User
          }
        }
      }
    }
  }
}
